//
// Created by wya on 2021/5/6.
//

#ifndef NFP_POLARIZATION_H
#define NFP_POLARIZATION_H
#include <iostream>
//#include <eigen3/Eigen/Dense>
#include <armadillo>
//using namespace Eigen;




namespace NfP
{
    struct nfp_parameters
    {
        int rows;
        int cols;
        int image_nums=3;

        arma::cube normal ;
        arma::mat Images;
        arma::mat mask ;
        arma::mat spec ;
        arma::vec angles=arma::vec(3);
        arma::mat Iun ;
        arma::mat rho ;
        arma::mat phi;
        arma::mat theta ;

        arma::uvec mask_cols;
        arma::uvec mask_rows;
        arma::uvec spec_cols;
        arma::uvec spec_rows;
        float n;

    };

    class Polarized
    {
    private:


    public:
        static void Initial(const std::string& path, NfP::nfp_parameters*  p);//
        static void Compute_polarization( NfP::nfp_parameters* p );
        static void rho_diffuse( NfP::nfp_parameters* p);
        static void rho_spec( NfP::nfp_parameters* p);
        static void polar2normal(arma::mat& zenith,arma::mat& azimuth,arma::cube* normal);
        static void NormalOfPolarized(const std::string& path,const std::string& save_path, NfP::nfp_parameters* p);
    };

}


#endif //NFP_POLARIZATION_H
